def score(mid_score,end_score,mid_rate=0.4):
    return mid_score*mid_rate+end_score*(1-mid_rate)

print(f"{score(70,80)=}")
print(f"{score(70,80,0.5)=}")

a_score = score(mid_rate=0.5,mid_score=80,end_score=88)
print(f"{a_score=}")


def score2(mid_score,end_score,/,mid_rate=0.4):
    return mid_score*mid_rate+end_score*(1-mid_rate)

a_score2 = score2(80,88,mid_rate=0.5)
print(f"{a_score2=}")


def my_sum(num1,num2,*my_list,**my_dict):
    sum = num1 + num2
    for num in my_list:
        sum +=num
    for key,value in my_dict.items():
        sum +=value
    return sum

print(f"可变参数{my_sum(10,20)=}")
print(f"可变参数{my_sum(10,20,30,40,50)=}")
print(f"可变参数{my_sum(10,20,30,40,50,mynum1=90,mynum2=100)=}")